package com.rongji.dfish.hello.index.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.rongji.dfish.hello.index.view.HelloView;
import com.rongji.dfish.hello.pub.controller.CommonController;
import com.rongji.dfish.ui.layout.View;

@Controller
@RequestMapping("/hello")
public class HelloController extends CommonController {
	@Autowired
	private HelloView helloView;

	public HelloView getHelloView() {
		return helloView;
	}

	public void setHelloView(HelloView helloView) {
		this.helloView = helloView;
	}

	@RequestMapping("/index")
	@ResponseBody
	public Object index(HttpServletRequest request) throws Exception {
		View view = helloView.buildIndexView();
		return view;
	}

}
